#include <omp.h>
#include <complex.h>
#include <stdio.h>
#include <fftw3.h>
#include <tgmath.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

struct input {
  FILE*    		fh;
  char     		run[80];        
  unsigned int      	nx, ny, nz;      
  double 		cfl, alpha, A, delta_2;
  double 		lx, ly, lz, Tmax, dt;	
  unsigned int 		nthreads;
  double		b;
  int 			heat;
  int 			io_num, zakh, dell_giov;
  int			ic_type;	
};

extern void load_consts (struct input *in);
extern void init_arrays ();
extern void free_arrays ();
extern void dump_grid (char *file);
extern void linear_step (fftw_complex a);
extern void potential_step();
extern void nnl_step (fftw_complex a);
extern void convolute();
extern double particles();
extern void linear_step_openMP (double a);
extern void nl_step(fftw_complex a);
extern void dump_grid_binary (char *file);
extern double hamiltonian ();
extern void omp_test ();
extern void dump_fourier (char *file);
extern void dump_fourier_binary (char *file);
extern void read_binary(char *file);
extern void ZS_step();
extern void phi_step();
extern void z_lapl();
extern void step_rho_1();
extern void step_rho_2();
extern void step1_psi ();
extern void step2_psi ();
extern void z_hstep (fftw_complex a);
extern void z_hstep2 (fftw_complex a);
extern void z_linear_step1 (fftw_complex a);
extern void z_linear_step2 (fftw_complex a);
extern void z_dump_grid (char *file);
extern double z_particles();